package models;
 
import java.math.BigDecimal;
import java.util.*;
import javax.persistence.*;
 
import play.data.validation.Required;
import play.db.jpa.*;
 
@Entity
public class Customer extends Model {
 
	@Required
	@Column(unique=true)
    public String username;
	@Required
	public String password;
	@Required
	public String firstname;
	@Required
	public String lastname;    	
	public String addr_line1;
    public String addr_line2;    
    public String city;    
    public String state;
    public String zip;
    @Required
    public BigDecimal cash;
    
    public Customer(String username, String password, String firstname,
			String lastname, String addr_line1, String addr_line2, String city,
			String state, String zip, BigDecimal cash) {
		this.username = username;
		this.password = password;
		this.firstname = firstname;
		this.lastname = lastname;
		this.addr_line1 = addr_line1;
		this.addr_line2 = addr_line2;
		this.city = city;
		this.state = state;
		this.zip = zip;
		this.cash = cash;
	}
    
    public String toString() {
    	return this.username;
    }

}